//
//  AppDelegate.m
//  太平洋电脑网
//
//  Created by dllo on 16/6/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "AppDelegate.h"
#import "HeadlineView.h"
#import "SecondView.h"
#import "ThirdView.h"
#import "FourthView.h"
#import "FifthView.h"


@interface AppDelegate ()

@end

@implementation AppDelegate
-(void)dealloc{
    [_window release];
    [super dealloc];
}


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
#pragma mark - 咨询页面的网址
    //导航栏图片和文字  http://mrobot.pconline.com.cn/configs/pconline_v8_cms_android_channel_tree
    //头条tableView的内容 (轮播图的数据也有) http://mrobot.pconline.com.cn/v2/cms/channels/999?pageNo=1&pageSize=20&appVersion=4.5.2
    //新闻    http://mrobot.pconline.com.cn/v2/cms/channels/2?pageNo=1&pageSize=20&appVersion=4.4.1
    //测评  http://mrobot.pconline.com.cn/v2/cms/channels/4?pageNo=1&pageSize=20&appVersion=4.4.1
    //图赏  http://mrobot.pconline.com.cn/v2/cms/channels/11?pageSize=20&pageNo=1
    //手机  http://mrobot.pconline.com.cn/v2/cms/channels/200?pageNo=1&pageSize=20&appVersion=4.4.1
    //直播  http://mrobot.pconline.com.cn/v2/cms/channels/10?pageNo=1&pageSize=20
    //试听  http://mrobot.pconline.com.cn/v2/cms/channels/12?pageNo=1&pageSize=20&appVersion=4.4.1
    
    
    
    
    
    
#pragma mark - 论坛页面的网址
     
    
    
    
    //论坛列表 http://mrobot.pconline.com.cn/configs/pconline_v4_bbs_forum_tree
    //最数码论坛里的热门帖子    //http://piebbs.pconline.com.cn/mobile/topics.ajax?type=hot_week&singleForum=false&noForums=22&ie=utf-8&count=100&showImage=true&forums=2

    //手机论坛里的热门帖子 http://mrobot.pconline.com.cn/s-900/onlineinfo/bbs/topics.xsp?singleForum=false&ie=utf-8&count=20&showImage=true&type=hot_week&forums=587012,769285,675902,768193,769283&noForums=762423

#pragma mark - 找产品页面的网址
#pragma mark - 聚超值页面的网址
#pragma mark - 我的页面的网址
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    //找产品
    //聚超值
    //我的
    
    self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds]];
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    
    HeadlineView *headView = [[HeadlineView alloc]init];
    UINavigationController *naVC = [[UINavigationController alloc]initWithRootViewController:headView];
    naVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"咨询" image:[UIImage imageNamed:@"咨询.png"] tag:1000];
    
    SecondView *secView = [[SecondView alloc]init];
    UINavigationController *secnaVC = [[UINavigationController alloc]initWithRootViewController:secView];
    secnaVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"论坛" image:[UIImage imageNamed:@"论坛.png"] tag:1001];

    ThirdView *thirdView = [[ThirdView alloc]init];
    UINavigationController *thirdnaVC = [[UINavigationController alloc]initWithRootViewController:thirdView];
    thirdnaVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"找产品" image:[UIImage imageNamed:@"找产品.png"] tag:1002];

    FourthView *fourthView = [[FourthView alloc]init];
    UINavigationController *fourthnaVC = [[UINavigationController alloc]initWithRootViewController:fourthView];
    fourthnaVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"聚超值" image:[UIImage imageNamed:@"聚超值.png"] tag:1003];

    FifthView *fifView = [[FifthView alloc]init];
    UINavigationController *fifnaVC = [[UINavigationController alloc]initWithRootViewController:fifView];
    fifnaVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"我的" image:[UIImage imageNamed:@"我的.png"] tag:1004];
    
    UITabBarController *tabbar = [[UITabBarController alloc]init];
    tabbar.viewControllers = @[naVC,secnaVC,thirdnaVC,fourthnaVC,fifnaVC];
    self.window.rootViewController = tabbar;
    [tabbar release];
    
    [headView release];
    [naVC release];
    [secView release];
    [secnaVC release];
    [thirdnaVC release];
    [thirdView release];
    [fourthView release];
    [fourthnaVC release];
    [fifView release];
    [fifnaVC release];
    [_window release];
    
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

@end
